#include<bits/stdc++.h>
using namespace std;
struct Tn{
    int r;
    bool f;
    bool die;
};
int n,sum;
Tn a[100001];
bool cmp(Tn a,Tn b){
    return a.r>b.r;
}
bool check(Tn a[]){
    for(int i=1;i<=n;i++)
        if(!a[i].f&&!a[i].die)
            return false;
    return true;
}

int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    int len=n;
    sum=n;
    for(int i=1;i<=n;i++){
        cin>>a[i].r;
        a[i].f=false;
        a[i].die=false;
    }
    sort(a+1,a+n+1,cmp);
    for(int i=1;i<=n;i++){
        if((!a[i].die)&&(!a[len].die)&&(!a[i].f)&&a[i].r>a[len].r&&i<len){
            a[i].f=true;
            a[len].die=true;
            sum--;
            len--;
        }
    }
    cout<<sum;
    fclose(stdin);
    fclose(stdout);
    return 0;
}
